package cz.zcu.fav.rat.managed.bean.calendar;

import java.util.List;

import org.joda.time.LocalDateTime;

import cz.zcu.fav.rat.beans.Period;
import cz.zcu.fav.rat.managed.bean.calendar.event.IEventFactory;

public class CalendarModelEventObject extends CalendarModelEventUser
{

	public CalendarModelEventObject(Integer id, IEventFactory factory)
	{
		super(id, factory);
	}

	private static final long serialVersionUID = -1298718425307574297L;

	protected List<Period> loadData(LocalDateTime since, LocalDateTime to)
	{
		List<Period> periods = getPeriodService()
				.getAllPeriodsByObjectIdInDateRange(getId(), since, to);
		return periods;
	}
}
